import { useRouter } from 'vue-router';

function useSuRouter() {
  const Router = useRouter();
  function router(name, query = {}) {
    Router.push({ name, query });
  }
  router.push = function (name, query = {}) {
    Router.push({ name, query });
  };
  router.replace = function (name, query = {}) {
    Router.replace({ name, query });
  };
  router.back = function () {
    Router.back();
  };
  router.forward = function () {
    Router.forward();
  };
  router.go = function (delta) {
    Router.go(delta);
  };
  return router;
}
export default useSuRouter;
